import request from '@/utils/request'
// 根据id更新权限 /sys/permission/{id}
export function updataPermissions(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}
// 根据ID获取权限点详情
export function getdataPermissions(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'get'

  })
}
// 根据id删除权限点
export function DELETEdataPermissions(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'DELETE'

  })
}
// 添加权限点
export function adddataPermissions(data) {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
// 获取所有权限点
export function AdddataPermissions(params) {
  return request({
    url: '/sys/permission',
    method: 'get'

  })
}
//
